<template>
	<view class="container">
		<view class="menus">
			<u-tabs :font-size="32" :list="menus" bg-color="transparent" :is-scroll="false" :current="current" @change="change"></u-tabs>
		</view>
		<view>
			<task-item v-for="(item,i) in jx_task" :key="i" :item="item"></task-item>
		</view>
	</view>
</template>

<script>
	import taskItem from './components/my-task-item.vue'
	export default {
		components:{taskItem},
		data() {
			return {
				menus:[{name:'全部'},{name:'待完成'},{name:'审核中'},{name:'未通过'},{name:'已完成'}],
				current:0,
				jx_task:[
					{status:1,name:'商家拉新',coin:1000,top:true,t_name:'互砍任务',jd:52,wc:10,sy:20,src:'https://cdn.uviewui.com/uview/common/logo.png'},
					{status:2,name:'商家拉新',coin:1000,top:true,t_name:'互砍任务',jd:0,wc:10,sy:20,src:'https://cdn.uviewui.com/uview/common/logo.png'},
					{status:3,name:'商家拉新',coin:1000,top:true,t_name:'互砍任务',jd:1,wc:10,sy:20,src:'https://cdn.uviewui.com/uview/common/logo.png'},
					{status:4,name:'商家拉新',coin:1000,top:true,t_name:'互砍任务',jd:52,wc:10,sy:20,src:'https://cdn.uviewui.com/uview/common/logo.png'},
					{status:5,name:'商家拉新',coin:1000,top:true,t_name:'互砍任务',jd:52,wc:10,sy:20,src:'https://cdn.uviewui.com/uview/common/logo.png'}
				]
			}
		},
		onLoad(parms){
			if(parms && parms.tab){
				this.current = parseInt(parms.tab)
			}
		},
		methods: {
			change(i){
				this.current = i
			},
		}
	}
</script>

<style lang="scss" scoped>
.container{padding: 0 24rpx;}
.menus{margin-bottom: 32rpx;}
</style>
